﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MyHealthByDesignWebsite.Models.NutritionProfile>" %>

<script src="<%: Url.Content("~/Scripts/jquery-1.5.1.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>


<% using (Html.BeginForm()) { %>
    <%: Html.ValidationSummary(true,"Please correct the invalid information") %>
    <fieldset>
        <legend>HealthProfile</legend>
       

        <div class="editor-field" visible="false">
            <%: Html.HiddenFor(model => model.U_UserID) %>
            <%: Html.ValidationMessageFor(model => model.U_UserID) %>
        </div> 
        

        <div class="editor-label">
            <%: Html.LabelFor(model => model.AL_activityLevelID,"Activity Level") %>
        </div>
        <div class="editor-field" >
            <%: Html.DropDownListFor(model => model.AL_activityLevelID, (IEnumerable<SelectListItem>)ViewBag.Categories)%>
            <%: Html.ValidationMessageFor(model => model.AL_activityLevelID, "*") %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.NP_height, "Height (inches)") %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.NP_height) %>
            <%: Html.ValidationMessageFor(model => model.NP_height, "Height must be a number greater than 0") %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.NP_weight, "Weight (lbs)") %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.NP_weight) %>
            <%: Html.ValidationMessageFor(model => model.NP_weight, "Weight must be a number greater than 0") %>
        </div>

         
        <div class="editor-field" visible="false">
            <%: Html.HiddenFor(model => model.NP_entryDate) %>
            <%: Html.ValidationMessageFor(model => model.NP_entryDate)%>
        </div>

      <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
<% } %>



